package com.hmyd.hmyd_android.view;

import com.hmyd.hmyd_android.R;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;

/**
 * 复写dialog
 * @author wangk
 *
 */
public class MyDialog extends Dialog {
	
	private View view;
	private int layout;
	private Context context;

	public MyDialog(Context context,int layout) {  
	    super(context, R.style.myDialogTheme); 
	    this.context = context;
	    this.layout = layout;
	    view = LayoutInflater.from(context).inflate(layout, null);
	}  
	  
	@Override  
	protected void onCreate(Bundle savedInstanceState) {  
	    super.onCreate(savedInstanceState);
	    setContentView(view); 
	}
	
	/**
	 * 获取顶级容器
	 */
	public View getContentView() {
		return this.view;
	}
	
}
